package cn.org.mrliu.ssm.model;

import java.util.Date;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import cn.org.mrliu.ssm.common.model.BaseModel;

public class Customer extends BaseModel {
	private static final long serialVersionUID = 4920416220437478910L;
	@NotNull(message = "{user.id.null}")
	private Integer id;
	@NotEmpty(message = "{user.name.null}")
	@Length(min = 5, max = 20, message = "{user.name.length.illegal}")
	@Pattern(regexp = "[a-zA-Z]{5,20}", message = "{user.name.illegal}")
	private String name;
	@NotNull(message = "{user.password.null}")
	private String phone;
	private Integer age;
	private Double score;
	private Integer createId;
	private Date createDate;
	private Date createTime;
	private Integer departmentId;
	private Integer employeeId;

	public Customer() {

	}

	public Customer(Integer id) {
		this.id = id;
	}

	public Customer(String name, String phone, Integer age, Double score, Integer createId, Date createDate,
			Date createTime, Integer departmentId, Integer employeeId) {
		this.name = name;
		this.phone = phone;
		this.age = age;
		this.score = score;
		this.createId = createId;
		this.createDate = createDate;
		this.createTime = createTime;
		this.departmentId = departmentId;
		this.employeeId = employeeId;
	}

	public Customer(Integer id, String name, String phone, Integer age, Double score, Integer createId, Date createDate,
			Date createTime, Integer departmentId, Integer employeeId) {
		this.id = id;
		this.name = name;
		this.phone = phone;
		this.age = age;
		this.score = score;
		this.createId = createId;
		this.createDate = createDate;
		this.createTime = createTime;
		this.departmentId = departmentId;
		this.employeeId = employeeId;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public Double getScore() {
		return score;
	}

	public void setScore(Double score) {
		this.score = score;
	}

	public Integer getCreateId() {
		return createId;
	}

	public void setCreateId(Integer createId) {
		this.createId = createId;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getDepartmentId() {
		return departmentId;
	}

	public void setDepartmentId(Integer departmentId) {
		this.departmentId = departmentId;
	}

	public Integer getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(Integer employeeId) {
		this.employeeId = employeeId;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
	}

}
